from typing import TypedDict
from langchain_core.tools import tool
from langchain_core.messages import HumanMessage, AIMessage, FunctionMessage
from langchain_core.runnables import RunnableConfig
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_core.output_parsers import StrOutputParser
from langchain_openai import ChatOpenAI
from langchain.agents import create_openai_functions_agent, AgentExecutor

OPENAPI_API_BASE_3 = "https://api.xty.app/v1"
OPENAPI_API_KEY_3 = "sk-cy1Pz61qsy5q97VM9e8eA1D173604b17Bd7a11Ed4cB8C136"


def getWeather(city: str) -> str:
    return f"现在{city}的天气是晴朗，气温25度。"


chat = ChatOpenAI(
    model="gpt-3.5-turbo-0125",
    base_url=OPENAPI_API_BASE_3,
    api_key=OPENAPI_API_KEY_3,
    temperature=0
)
prompt = ChatPromptTemplate.from_messages([
    ("system", "你是一个AI助手"),
    ("")
])
